<# # It is recommended to test the script on a local machine for its purpose and effects. # ManageEngine Endpoint Central will not be responsible for any # damage/loss to the data/setup based on the behavior of the script. # Description: Script is designed To check the font exists or not # Configuration Type - COMPUTER # Arguments: Hardcode the values inside the script. #> # Font name needs to be hardcoded here $fontName = "arial" # Folder path (you can keep this fixed or prompt for it too) $folderPath = "C:\Windows\Fonts" # Check if folder exists if (Test-Path $folderPath -PathType Container) { Write-Host "Folder found: $folderPath" # Search for files matching the font name $fontFiles = Get-ChildItem $folderPath -Filter "$fontName.*" | Select-Object -ExpandProperty Name if ($fontFiles) { Write-Host "Font '$fontName' exists in the folder:" $fontFiles | ForEach-Object { Write-Host " - $_" } } else { Write-Host "Font '$fontName' not found in the folder." } } else { Write-Host "Folder not found: $folderPath" }